#include "libutilsconfig.h"
#include "uSystem.h"

LIB_NS_BEGIN

tstring USystem::GetEnv( const TCHAR* key )
{
	const TCHAR* pval = _tgetenv(key);
	return pval;
}


Platform USystem::GetPlatForm()  
{
	return  sizeof(int*) == 32 ? _32 : _64;
}

tstring USystem::GetUserName()
{
	tstring user_p;
	const TCHAR *none_name = _T("_unknown");		
#if defined (WINDOWS) || defined(_WINDOWS)
	user_p = GetEnv(_T("USERNAME"));
#else
	user_p = getenv("USER");
#endif		
	
	return user_p;
}
LIB_NS_END